capture program drop gatt
program define gatt 
args n type
replace b_gatt_`type'= _b[gattwto] if _n==`n'
replace se_gatt_`type' = _se[gattwto]  if _n==`n'
replace pval_gatt_`type'= 2*normal(-abs(_b[gattwto]/_se[gattwto]))  if _n==`n'
replace method_`type' = "`e(cmd)'" if _n==`n'
replace dv_`type' = "`e(depvar)'" if _n==`n'
replace dv_`type' = "`:word 2 of `e(cmdline)''" if _n==`n' & dv_`type'==""
replace lo_gatt_`type' = _b[gattwto]-(_se[gattwto]*invnormal(.975)) if _n==`n'
replace hi_gatt_`type' = _b[gattwto]+(_se[gattwto]*invnormal(.975)) if _n==`n'
replace N_gatt_`type' = `e(N)'  if _n==`n'
end
